package main

import "fmt"

//函数的也是一种数据类型
func main() {

	//fmt.Println(sum(343))
	fmt.Println(sum(343, 34, 1, 1, 1, 1, 10))

}

func sum(n1 int, args ...int) (sum int) {
	sum = n1
	for i := 0; i < len(args); i++ {
		sum += args[i]
	}
	return
}
